package com.cenntro.auth.controllers;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cenntro.auth.model.dbo.SysSooidRoleRefDO;
import com.cenntro.auth.service.SysSooidRoleRefService;
import com.cenntro.common.base.BaseController;
import com.cenntro.common.util.result.PageResult;
import com.cenntro.common.util.result.Result;

import io.swagger.annotations.ApiOperation;




@RestController
@RequestMapping("/sysSooidRoleRef")
public class SysSooidRoleRefController extends BaseController {

    @Resource
    private SysSooidRoleRefService sysSooidRoleRefService;
    
    /**
     * 查询用户和角色关系
    * @Title selectPage
    * @Description TODO
    * @param 
    * @return
     */
    @ApiOperation(value = "查询用户和角色关系", notes = "查询用户和角色关系")
    @RequestMapping(value = "/selectPage")
    public Result selectPage(Integer roleId, Integer userId, Integer refId) {
        SysSooidRoleRefDO refDO = new SysSooidRoleRefDO();
        refDO.setRoleId(roleId);
        refDO.setRefId(refId);
        refDO.setSooid(userId);
        List<SysSooidRoleRefDO> refList = sysSooidRoleRefService.selectPage(refDO);
        return PageResult.ok(refList);
    }
}
